//
//  HEGoodsCommentModel.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/10/23.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEGoodsCommentModel.h"

@implementation HEGoodsCommentModel

- (NSArray *)kemail {
    if (!_kemail) {
        if (_email == nil) {
            _kemail = @[];
        }else if([_email isEqualToString:@"null"]) {
            _kemail = @[];
        }else if([_email isEqualToString:@""]) {
            _kemail = @[];
        }else {
            NSString *urls = [_email substringWithRange:NSMakeRange(1, _email.length-2)];
            _kemail = [urls componentsSeparatedByString:@","];
        }
    }
    return _kemail;
}

 

- (BOOL)isJsonString:(NSString *)jsonString{
    if (jsonString.length < 2) return NO;
    if (!([jsonString hasPrefix:@"{"] || [jsonString hasPrefix:@"["])) return NO;
    // {:123  }:125  [: 91  ]:93
    return [jsonString characterAtIndex:jsonString.length-1]-[jsonString characterAtIndex:0] == 2;
}

- (NSString *)kconsultAddtime {
    if (!_kconsultAddtime) {
        _kconsultAddtime = [NSDate timestampToDate:_consultAddtime formaterMode:NSDateFormaterModeTime];
    }
    return _kconsultAddtime;
}

@end
